xen/arm: acpi: Handle correctly detection of GICv2 on GICv3
authorJulien Grall <julien.grall@arm.com>
Fri, 3 Feb 2017 19:18:45 +0000 (19:18 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 16 Feb 2017 01:36:21 +0000 (17:36 -0800)
commit1756ab608379744de6901632a8b494681173c045
tree00fc1123a9bc34db0133eab72a7c0cf5446dd707
parent07af2e9da1ddd2c32eee8331e521c670eecd8993
xen/arm: acpi: Handle correctly detection of GICv2 on GICv3

When the GICv3 is not GICv2 compatible, the associated field in the MADT
will be zeroed. However, the rest of the code expects the variable to
be set to INVALID_PADDR.

This will result to false detection of GICv2 and give I/O access to page
0 for the hardware domain.

Thankfully, it will fail because the size of GICV has not been set.

Fix the detection by converting 0 to INVALID_PADDR for the GICC and
GICV base. At the same time only set the size of each region when the
base address is not 0.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/gic-v3.c